<%@ include file="/common/taglibs.jsp"%>
<!--分页查询共用的页面-->
<%@ include file="/common/common.jsp"%>

<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.9.1.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">
  <script>
    $(function () {
     // $("#tabs").tabs();
    });
    window.onload = function () {
      var url = getRootPath_web() + "/vehicle/viewInfo.action?vehicleId=${vehicleId}";
      var tabs = $("#tabs");
      var uls = $("#uls");
      if(tabs != undefined && uls != undefined){
        uls.append('<li><a href="#tabs-3">视频参数设置</a></li>');
        tabs.append('<div id="tabs-3"><p>tab3</p></div>');
      }
      $("#tabs").tabs();
      $("#tabs-1").load(url);
      console.log(url);
    };

    function getRootPath_web() {
      //获取当前网址，如： http://localhost:8083/uimcardprj/share/meun.jsp
      var curWwwPath = window.document.location.href;
      //获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
      var pathName = window.document.location.pathname;
      var pos = curWwwPath.indexOf(pathName);
      //获取主机地址，如： http://localhost:8083
      var localhostPaht = curWwwPath.substring(0, pos);
      //获取带"/"的项目名，如：/uimcardprj
      var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
      return (localhostPaht + projectName);
    }
  </script>
</head>

<body>
    <div id="tabs" class="tab">
    <ul id="uls">
    <li><a href="#tabs-1">车辆信息</a></li>
    <li><a href="#tabs-2">音频参数设置</a></li>
    </ul>
    <div id="tabs-1">
    <p>tab1</p>
  </div>
  <div id="tabs-2">
  <p>tab2</p>
  <p>${message}</p>
  </div>
    </div>
    
</body>
</html>